Drawing.bezierIntersect Method
Determines the point at which two specified Bézier segments intersect rounded to the nearest integer.
This method is static.
Parameters
- startX1
-
Type: Number
The X coordinate of the start of the first segment.
- startY1
-
Type: Number
The Y coordinate of the start of the first segment.
- cp1x1
-
Type: Number
The X coordinate of the first segment's first control point.
- cp1y1
-
Type: Number
The Y coordinate of the first segment's first control point.
- cp2x1
-
Type: Number
The X coordinate of the first segment's second control point.
- cp2y1
-
Type: Number
The Y coordinate of the first segment's second control point.
- endX1
-
Type: Number
The X coordinate of the end of the first segment.
- endY1
-
Type: Number
The Y coordinate of the end of the first segment.
- startX2
-
Type: Number
The X coordinate of the start of the second segment.
- startY2
-
Type: Number
The Y coordinate of the start of the second segment.
- cp1x2
-
Type: Number
The X coordinate of the second segment's first control point.
- cp1y2
-
Type: Number
The Y coordinate of the second segment's first control point.
- cp2x2
-
Type: Number
The X coordinate of the second segment's second control point.
- cp2y2
-
Type: Number
The Y coordinate of the second segment's second control point.
- endX2
-
Type: Number
The X coordinate of the end of the second segment.
- endY2
-
Type: Number
The Y coordinate of the end of the second segment.
Return Value
Type: Array
ElementType: Array
An array containing the points of intersection, if any, each an array with X, Y, t1, and t2 coordinates, respectively, where t1 is the point
of intersection along the first segment and t2 is the point of intersection along the second, and where 0 is the start and 1 is the end.